home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Language/OS - Multiplatform Resource Library
/
LANGUAGE OS.iso
/
lisp
/
kcl
/
akcl
/
kcl.lha
/
bin
/
build_o.c
next >
Wrap
C/C++ Source or Header
|
1985-09-06
|
404b
|
28 lines
#include <stdio.h>
main(argc, argv)
int argc;
char **argv;
{
FILE *datafile, *ofile;
int i, c;
if (argc != 3) {
fprintf(stderr, "Arg count.\n");
exit(1);
}
datafile = fopen(argv[1], "r");
ofile = fopen(argv[2], "a");
i = 0;
for (;;) {
c = getc(datafile);
if (feof(datafile))
break;
putc(c, ofile);
i++;
}
fwrite((char *)(&i), 4, 1, ofile);
fclose(datafile);
fclose(ofile);
}